<?php
/* 视图控制器 */

namespace App\Http\Controllers\User;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Session;


class IndexController extends Controller
{
    #登录
    public function login()
    {
        $auth = Session::get('isChatUserLogin');
        //判断登录验证是否通过
        if ($auth === false) {
            Session::flush(); //清除登录信息
        }
        return view('user/login', ['isAuth' => $auth]);
    }

    #注册
    public function register(Request $request)
    {
        $code = $request->pid;
        return view('user/register', ['pid' => $code]);
    }
}
